package cn.itcast.web;

import cn.itcast.rabbitmq.service.RabbitmqService;
import cn.itcast.util.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author lyy
 * @Description TODO
 * @PACKAGE_NAME: cn.itcast.web
 * @ClassName TestController
 * @Date 2020/7/2 9:44
 * @DAY_NAME_FULL: 星期四
 * @Version 1.0
 **/
@RestController
@RequestMapping(value = "/rabbitmq")
public class TestController {
    @Resource
    private RabbitmqService rabbitmqService;

    @RequestMapping(value = "/test")
    public ResponseEntity test(@RequestParam(value = "msg")String msg){
        this.rabbitmqService.sendTest(msg);
        return new ResponseEntity(200);
    }

}
